<script setup lang="ts">
const { t } = useI18n()
const menuItems = computed(() => ([
  { title: t('查看商品'), route: 'shop' },
  { title: t('查看库存'), route: 'inventory' },
]))
</script>

<template>
  <van-row justify="space-around">
    <van-col span="6">
      <div>
        购买
      </div>
    </van-col>
    <van-col span="6">
      <div>
        销售
      </div>
    </van-col>
  </van-row>
  <van-cell-group :title="t('管理')" :border="false" :inset="true">
    <template v-for="item in menuItems" :key="item.route">
      <van-cell :title="item.title" :to="item.route" is-link />
    </template>
  </van-cell-group>
</template>

<route lang="json5">
{
  name: 'home',
  meta: {
    title: '主页',
    i18n: 'menus.home'
  },
}
</route>
